from genericpath import isfile
from pyexpat import model
from word_vec_encoders.char_word_vec_encoder import CharWordVecEncoder
from utils.preprocessor import Preprocessor

if __name__ == '__main__':    

    #################################################
    # 训练静态词向量

    corpus_dir = './data/full_text/'

    w2v_model = CharWordVecEncoder()
    w2v_model.pretrain_iterably(corpus_dir, Preprocessor.MassiveFullTextIterator(corpus_dir))